home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Abalone 1.4.2 / src / Game.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-21  |  932 b   |  59 lines  |  [TEXT/MPS ]

  1. #ifndef GAME_H
  2. #define GAME_H
  3.  
  4. #include "Board.h"
  5.  
  6. #ifndef THINK_C
  7. #include <StandardFile.h>
  8. #include <Types.h>
  9. #endif
  10.  
  11. //    A game is mostly a board, but there is slightly more to it, like whose turn it is.
  12.  
  13. typedef struct _game
  14. {
  15.     BoardPtr        Board;
  16.                 //    Pointer to the current board.
  17.                     
  18.     unsigned char    Players;
  19.                 //    The number of players in this game (2 or 3).
  20.     
  21.     unsigned char    CurrentPlayer;
  22.                 //    The player whose turn it is now.
  23.     
  24.     short            CurrentMove;
  25.                 //    Counter for the number of moves
  26.     
  27. }    Game, *GamePtr;
  28.  
  29.  
  30. void            InitGame (void);
  31. void            OpenGame (void);
  32. OSErr            OpenGameSpec (FSSpec *specification);
  33. void            SaveGame (void);
  34. void            SaveGameAs (void);
  35. unsigned char    CurrentPlayer (void);
  36.  
  37.  
  38. #ifdef GAME_C
  39.  
  40. #include "Draw3D.h"
  41. #include "Error.h"
  42. #include "File.h"
  43. #include "Global.h"
  44. #include "Menu.h"
  45. #include "Settings.h"
  46.  
  47. #ifndef THINK_C
  48. #include <ToolUtils.h>
  49. #endif
  50.  
  51. #else
  52.  
  53. extern Game    gTheGame;
  54.  
  55. #endif
  56.  
  57.  
  58.  
  59. #endif